<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ page import="java.util.*" %>

<html>
<head>
	<title></title>

	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/help/help.css" />
		
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/datepicker/css/ui.all.css"  />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/sampleForm.css" />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/me.css" />	
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/autocomplete/css/mainOLD.css" />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/autocomplete/css/jquery.autocomplete.css" />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/autocomplete/css/thickbox.css" />	
	

	
	<script type='text/javascript' src='<%= request.getContextPath() %>/css/autocomplete/lib/jquery.js' ></script>	
	<script type="text/javascript" src="<%= request.getContextPath() %>/stockRequest/jquery.validate.js" ></script>
			
	<script type="text/javascript">
		$(document).ready(function(){
    			//$("#docDate").datepicker({ altField: 'input#docDate', altFormat: 'yy-mm-dd' });
							
			$("#form1").validate({
									
				submitHandler: function() {					
					alert("ok!!");					
					form.submit();
				},
						
				rules: {
					requirement: "required"													
				},
				messages: {
					requirement1: "*"
				},

				// the errorPlacement has to take the table layout into account
				errorPlacement: function(error, element) {
					//alert("errorPlacement");			
					if ( element.is(":radio") ) {
						alert("radio");
						error.appendTo( element.parent().next().next() );
					}else if ( element.is(":checkbox") ) {
						alert("checkbox");
						error.appendTo ( element.next() );
					}else {

						error.appendTo( element.parent().next() );
					}
				}		
			});
		});
	</script>
	
</head>
<body>

<div id="wrapper">
	<!-- 
		<div id="header"><img src="images/kiuchilogo.png" width="305" height="80" /></div>
	 -->	 
	<div id="menu">
	    <ul id="nav">
		  <!--    
	      <li><a href="index.html">Home</a></li>
	      <li><a href="products.html">Products</a>
				<ul>
				<li><a href="products.html">SAFETY DEVICES</a></li>
				<li><a href="products.html?#valves">VALVES</a></li>
				<li><a href="products.html?#temp">TEMPERATURE SENSOR</a></li>
				<li><a href="products.html?#power">POWER WEIGHING & CONVEYING SYSTEM</a></li>
				</ul>
		  </li>
	      <li><a href="enquiry.php">Enquiry</a></li>
	      <li><a href="contact.php">Contact</a></li>
	      -->
	    </ul>
	    	
	  </div>
	  
	<div id="content">
		<div id="menuNav"><a href='<%=request.getContextPath() %>/Login.do?mode=check'>หน้าหลัก</a> 
		>> 
		ช่วยเหลือ 
		>> 
		ความต้องการเพิ่มเติม  </div>
		  
		<div id="userPw01">
			<html:form action="/requirement.do?mode=add" styleId="form1"  >
			<fieldset>
				<legend><b>ข้อมูลขอความต้องการเพิ่มเติม</b></legend>
		    <center><br />
		   <table border="0" >
			<tr>
				<td width="120"><label> เลขที่เอกสาร </label></td>
				<td width="140"><html:text property="docNo" styleId="docNo" value="${docNo}" readonly="true" />
				</td>
				<td ></td>				
			</tr>
			<tr>
				<td ><label> วันที่ทำงาน</label></td>
				<td ><html:text property="docDate" styleId="docDate"  readonly="true" 
						value="${docDate}" /></td>
				<td ></td>					
			</tr>			

			<tr>
				<td ><label>ฝ่ายผู้ใช้ </label></td>
				<td ><input type="text" name="departCode" value="${departCode }" id="departCode" readonly="true" ></td>
				<td ></td>					
			</tr>			 		
			
 			<tr>
 				<td><label>ผู้ใช้งาน</label></td>
 				<td><html:text property="personCode" styleId="personCode" value="${userName}" readonly="true" /></td>
 				<td ></td>	
 			</tr>
 			<tr>
 				<td><label>ความต้องการ</label></td>
 				<td>
 					<html:text property="requirement" styleId="requirement" value='${requirement}' maxlength="200" size="50"/></td>
 				<td ></td>
 			</tr> 			 			 			 				 							
		</table>
		<br />
	 	<table border="0" align="center" >
	 		<tr>
	 			<td align="center" ><html:submit value="บันทึกข้อมูล"  /></td>
	 			<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
	 			<td align="center" ><html:reset value="เคลียร์หน้าบันทึก"/></td>
	 		</tr>
	 	</table> 		
		</center>
     	</fieldset>
     	</html:form><br>
     </div>
     
  	</div>
  		  
</div>
</body>
</html>